/**
 * 定义站点模块
 */
(function(window, angular, undefined){

	var module = angular.module('water.entity.monitorEquipment',['waterCommon']);
	
	module.service('$monitorEquipmentService',function($waterDataCommon){
		
		/**
		 * 查询仪器列表
		 * {
		 * 	WWTP_ID:'',
		 *  STATION_ID:''
		 * }
		 */
		this.getList = function(queryObj){
			var promise = $waterDataCommon.post("/MonitorEquipment/getList",queryObj);
			return promise;
		}
		/**
		 * 获取仪器model
		 */
		this.getModel = function(key){
			var promise = $waterDataCommon.getModel("BC_SITE_DEVICE_RPT",key);
			return promise;
		}
		/**
		 * 新建仪器
		 */
		this.createModel = function(monitorEquipment){
			var promise = $waterDataCommon.createModel("BC_SITE_DEVICE_RPT",monitorEquipment);
			return promise;
		}
		/**
		 * 更新仪器
		 */
		this.updateModel = function(monitorEquipment){
			var promise = $waterDataCommon.updateModelWithChild("BC_SITE_DEVICE_RPT",monitorEquipment);
			return promise;
		}
		/**
		 * 删除仪器
		 */
		this.deleteModel = function(id){
			var promise = $waterDataCommon.deleteModel("BC_SITE_DEVICE_RPT",{key:id});
			return promise;
		}
		
	})
}(window, angular));